﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WCFMINERP.Contracts.InterFaces
{
    public static class AnalysEventMonitor
    {
        public static EventHandler<AnalysInfoEventArgs> AnalysInfoSended;
        public static void Send(AnalysInfoEventArgs args)
        {
            if (null != AnalysInfoSended)
            {
                AnalysInfoSended(null, new AnalysInfoEventArgs(args.EventTime,args.EventType,args.Information));
            }
        }
    }
    public class AnalysInfoEventArgs : EventArgs
    {
        public DateTime EventTime { get; private set; }
        public EventType EventType { get; private set; }
        public string Information { get; private set; }
        public AnalysInfoEventArgs(DateTime date, EventType type, string info)
        {
            this.EventTime = date;
            this.EventType = type;
            this.Information = info;
            
        }
    }
    public enum EventType
    {
        Normal,
        Error
    }
}
